package com.ruoyi.yljf.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 考试总结表
 *
 * @TableName yljf_exam_summary
 */
@Data
@TableName(value = "yljf_exam_summary")
public class ExamSummary implements Serializable {
    /**
     * 主键 id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 考试类型  /课程考试/章节练习
     */
    @TableField(value = "exam_type")
    private String examType;

    /**
     * 用户 id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 章节 id
     */
    @TableField(value = "chapter_id")
    private Long chapterId;

    /**
     * 课程 id
     */
    @TableField(value = "course_id")
    private Long courseId;

    /**
     * 章节最后停留题号
     */
    @TableField(value = "cur_question")
    private Integer curQuestion;

    /**
     * 总题目
     */
    @TableField(value = "total_questions")
    private Integer totalQuestions;

    /**
     * 答对数
     */
    @TableField(value = "correct_answers")
    private Integer correctAnswers;

    /**
     * 错答数
     */
    @TableField(value = "wrong_answers")
    private Integer wrongAnswers;

    /**
     * 已答数
     */
    @TableField(value = "answered")
    private Integer answered;

    /**
     * 未答数
     */
    @TableField(value = "unanswered")
    private Integer unanswered;

    /**
     * 总耗时
     */
    @TableField(value = "total_time")
    @JsonFormat(pattern = "HH:mm:ss")
    private Date totalTime;

    /**
     * 正确率
     */
    @TableField(value = "accuracy")
    private String accuracy;

    /**
     * 提交时间
     */
    @TableField(value = "submitted_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submittedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}